﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class OnllyKaiguanController : MonoBehaviour {

    private Vector3 v_close=new Vector3(-4.404f, 77.609f, 70.735f);
    private Vector3 v_open = new Vector3(-4.404f, 100.0f, 70.735f);
    private bool b_isOpen;

	// Use this for initialization
	void Start () {
		
	}

    void OnMouseDown() {
        if (!b_isOpen)
        {
            transform.localEulerAngles = v_open;
            b_isOpen = true;
            EventManager<bool>.TriggerEvent(MyEventType.OnllyHeiPingEvent,false);
        }
        else {
            transform.localEulerAngles = v_close;
            b_isOpen = false;
            EventManager<bool>.TriggerEvent(MyEventType.OnllyHeiPingEvent, true);
        }
    }
}
